import com.sun.org.apache.bcel.internal.classfile.InnerClass;

class Outclass2{//外部类

    public int data1=1;
    private int data2=2;

    public static int data5=5;
    //非静态内部类
    class InnerClass2
    {
        public int data1=11111;
        public int data3=1;
        private int data4=2;
        public static final  int data6=5;
        public void func()
        {
            Outclass outclass=new Outclass();
            System.out.println("==============");
            System.out.println(data1);
            System.out.println(Outclass2.this.data1);
            System.out.println(data2);
            System.out.println(data3);
            System.out.println(data4);
            System.out.println(data5);
            System.out.println(data6);

        }
    }

    public void fun()
    {
        System.out.println("==============");
        InnerClass2 innerClass2=new InnerClass2();
        System.out.println(data1);
        System.out.println(data2);
        System.out.println(innerClass2.data3);
        System.out.println(innerClass2.data4);
        System.out.println(data5);
        System.out.println(innerClass2.data6);
    }
}



public class Test2 {
    public static void main(String[] args) {
        Outclass2 outclass2=new Outclass2();
        Outclass2.InnerClass2 innerClass2=outclass2.new InnerClass2();
        innerClass2.func();
        outclass2.fun();
    }



}

